package com.ctgu.springstart.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

//@Component
public class TopicConsumer {

    @JmsListener(destination = "news.topic", containerFactory="jmsListenerContainerTopic")
    public void receive1(String text){
        System.out.println("topic receive1收到的报文为:" + text);
    }

    @JmsListener(destination = "news.topic", containerFactory="jmsListenerContainerTopic")
    public void receive2(String text){
        System.out.println("topic receive2收到的报文为:" + text);
    }

    @JmsListener(destination = "news.topic")
    public void receive3(String text){
        System.out.println("topic receive3收到的报文为:" + text);
    }
}
